﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Emerson.Storage.Station;
using Emerson.Storage.Core;
using Emerson.Storage.Entities;
using Emerson.Storage.Station.Interfaces;
using System.Data.Objects;
using System.Threading.Tasks;

namespace Emerson.Storage.Station.Services
{
    public class StationRepository<TStation> : IStationRepository<TStation>
                 where TStation : class, IStation
    {
        private readonly IObjectContext _context;
        private readonly IObjectSet<TStation> _objectSet;

        public StationRepository(IObjectContext context)
        {
            _context = context;
            _objectSet = _context.CreateObjectSet<TStation>();
        }

        public void Add(TStation entity)
        {
            _objectSet.AddObject(entity);
        }

        public void Delete(TStation entity)
        {
            throw new NotImplementedException();
        }

        public void Attach(TStation entity)
        {
            throw new NotImplementedException();
        }

        public List<TStation> GetAll()
        {
            throw new NotImplementedException();
        }

        public TStation First(Func<TStation, bool> where)
        {
            throw new NotImplementedException();
        }

        #region IRepository<IStation> Members

        public void Add(IStation entity)
        {
            throw new NotImplementedException();
        }

        public void Delete(IStation entity)
        {
            throw new NotImplementedException();
        }

        public void Attach(IStation entity)
        {
            throw new NotImplementedException();
        }

        List<IStation> IRepository<IStation>.GetAll()
        {
            throw new NotImplementedException();
        }

        public IEnumerable<IStation> Find(Func<IStation, bool> where)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
